<template>
  <el-pagination
    class="pagination--box"
    layout="total, prev, pager, next"
    prev-text="上一页"
    next-text="下一页"
    :total="total"
    :page-size="pageSize"
    :current-page="currentPage"
    @current-change="handleCurrentChange"
  />
</template>

<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'App',
  props: {
    currentPage: Number,
    pageSize: Number,
    total: Number
  },
  emits: ['current-change'],
  setup(props, { emit }) {
    const handleCurrentChange = (current: number) => {
      emit('current-change', current)
    }
    return {
      handleCurrentChange
    }
  }
})
</script>

<style lang="less" scoped></style>
